﻿@model yule.Model.Sys.User

@{
    ViewBag.Title = "Insert";
}

@using (Html.BeginForm("DoInsert", "User"))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>User</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.State)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.State)
            @Html.ValidationMessageFor(model => model.State)
        </div>

        
        <div class="editor-label">
            @Html.LabelFor(model => model.RegionId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RegionId)
            @Html.ValidationMessageFor(model => model.RegionId)
        </div>

        <p>
        @{
            var CallBackFun = ViewData["CallBackFun"];
            if (CallBackFun != null)
            {
                <span style="color:Red;">要回调啊<@(CallBackFun)>;那我还没去实现Ajax提交并且回调</span>
            }
            else
            {
                <input type="submit" value="Create" />
            }
        }
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("用户列表", "Index")
</div>


<script type="text/javascript">
    var CurrentMenu = "用户";
</script>